﻿using System;
using System.Windows;
using System.Windows.Documents;
using System.Collections.Generic;
using Microsoft.Win32;

namespace Demo
{
    public partial class UIAnnotationsWindow : Window
    {
        private Person _currentPerson;

        public UIAnnotationsWindow()
        {
            InitializeComponent();

            List<Department> departments = new List<Department>()
            {
                new Department { Name="Finance" },
                new Department { Name="Administration" },
                new Department { Name="Development" }
            };
            this.departmentComboBox.ItemsSource = departments;
            _currentPerson = new Person { Id = 1, Name = "Jörg Neumann", Birthday = new DateTime(1971, 7, 29), Department = departments[2] };
            this.DataContext = _currentPerson;
        }

        private void checkNameMenuItem_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Validate name...");
        }

        private void searchNameMenuItem_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Search for name...");
        }

        private void saveImageMenuItem_Click(object sender, RoutedEventArgs e)
        {
            SaveFileDialog dlg = new SaveFileDialog();
            dlg.Title = "Save Image...";
            dlg.Filter = "PNG Image|*.png|All Files|*.*";
            dlg.FileName = _currentPerson.Name + ".png";
            if (dlg.ShowDialog().Value)
            {
            }
        }
    }
}
